-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - depends on #44 - Global debugging settings atomization #48
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allocation is removed from diag_os_newmtx and it is renamed to diag_os_initmtx. diag_os_delmtx no longer frees. The void typedef had to be corrected for static allocation of mutex objects to be possible. (Note that no objects can be void in C, ie. void is a null set.)
Accomplished by adding a new Macro constant and a new function. Also applied to the only mutex, in diag_l2.c
Clang-format nicely formats/normalizes code and is quite smart, assuring no line takes up more than 92 columns, also it gives us nice alignments and whitespace usage in general. It is able to break string literals or comments if needed. Accomplished by a script like this, the looping/piping is because clang-format is not idempotent as far as I know: f() { clang-format '-style={BasedOnStyle: llvm, AllowShortFunctionsOnASingleLine: Empty, AlwaysBreakAfterReturnType: AllDefinitions, AlwaysBreakBeforeMultilineStrings: true, ContinuationIndentWidth: 8, IndentPPDirectives: AfterHash, IndentWidth: 8, UseTab: ForContinuationAndIndentation, ColumnLimit: 92, SortIncludes: false, PenaltyBreakComment: 0, PenaltyBreakString: 0, PenaltyReturnTypeOnItsOwnLine: 0}' } f | f | f | f
Also moved the mutex taking a bit in diag_l2_timer to lessen the time during which the lock is taken by diag_l2_timer.
Added atomics stuff, we will also need it for fixing diag_l0_debug, diag_l1_debug, diag_l2_debug, diag_l3_debug, diag_cli_debug usage. Atomic accesses are used to fix the data races when the periodic timers could try to take destroyed mutexes.
If I'm not mistaken there is some overlap in the commits here and #44 ? this makes it slightly harder to review and merge, could you either
Thanks! |
nsajko
changed the title
Global debugging settings atomization
WIP - depends on #44 - Global debugging settings atomization
Jan 4, 2018
Hi, revisiting this after a break, is the global debug flag work complete ? I see some "tmp" commits so it's hard to tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just for reference.
#47